<script>
	import Vue from 'vue'
	export default {
		onLaunch: function() {
			//获取系统的基本信息
			uni.getSystemInfo({
				success: function(e) {
					Vue.prototype.WH = e.windowHeight;

					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif

					// #ifdef MP-WEIXIN
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
					// #endif		

					// #ifdef MP-ALIPAY
					Vue.prototype.StatusBar = e.statusBarHeight;
					Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
					// #endif

					Vue.prototype.bodtyH = e.windowHeight - e.statusBarHeight;
				}
			});
			//获取登录信息

			//获取位置信息
			// uni.getLocation({
			// 	type: 'wgs84',
			// 	success(res) {
			// 		console.log(res);
			// 	}
			// });
			// this.Reques.checkLogin((d) => {
			// 	console.log("是否登录 : " + d);
			// 	if (!d) {
			// 		uni.getProvider({
			// 			service: 'oauth',
			// 			success: (res) => {
			// 				console.log(res.provider)
			// 				if (~res.provider.indexOf('weixin')) {
			// 					uni.login({
			// 						provider: 'weixin',
			// 						success: (loginRes) => {
			// 							let appid = this.Reques.appid; //appid
			// 							let url = "xcx/weixin.api.php";
			// 							let data = {
			// 								"action": "getWeixinUserInfoByCode",
			// 								"appId": appid,
			// 								"code": loginRes.code
			// 							};
			// 							let tishi = () => {
			// 								uni.showModal({
			// 									title: '提示',
			// 									content: '登录失败',
			// 									showCancel: false,
			// 									success: function(res) {
			// 										if (res.confirm) {
			// 											return false;
			// 											console.log('用户点击确定');
			// 										} else if (res.cancel) {
			// 											console.log('用户点击取消');
			// 										}
			// 									}
			// 								})
			// 							}

			// 							//请求接口
			// 							this.Reques.request(url, 'GET', data).then((res) => {

			// 								console.log("完登录");
			// 								if (res.statusCode == 200 && res.data.code == 0) {
			// 									Vue.prototype.$openid = res.data.openId;
			// 									console.log("openid aaaaaaaaaaaaa  "+this.$openid);
			// 									uni.setStorage({
			// 										key: "session",
			// 										data: res.data,
			// 										success: () => {
			// 											this.Reques.updataSession();
			// 											console.log("stroage success!");
			// 										},

			// 									});
			// 								} else {

			// 									tishi();
			// 								}

			// 							}, (err) => {
			// 								tishi();
			// 								console.log("获取失败");

			// 							});



			// 						}
			// 					});
			// 				} else {

			// 				    uni.showModal({
			// 				    	title:'提示',
			// 						confirmText:'支持微信小程序'
			// 				    })

			// 					console.log("只支持微信");

			// 				}


			// 			}
			// 		});

			// 	}
			// 	else{
			// 		uni.getStorage({
			// 			key: "session",
			// 			success: (res) => {
			// 				Vue.prototype.$openid=res.data.openId;

			// 			},
			// 			fail: (err) => {
			// 				console.log("信息获取错误"+JSON.stringify(err));

			// 			},

			// 		});

			// 	}

			// })







		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}

	}
</script>

<style>
	@import "colorui/main.css";
	@import "colorui/icon.css";
	@import "colorui/animation.css";

	.bgColor {
		color: white;
		background-color:#024854 ;
	}

	.nav-list {
		display: flex;
		flex-wrap: wrap;
		padding: 0px 40upx 0px;
		justify-content: space-between;
	}

	.footBox {
		width: 100%;
	}

	.nav-li {
		padding: 30upx;
		border-radius: 12upx;
		width: 45%;
		margin: 0 2.5% 40upx;
		background-image: url(https://cdn.nlark.com/yuque/0/2019/png/280374/1552996358352-assets/web-upload/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
		background-size: cover;
		background-position: center;
		position: relative;
		z-index: 1;
	}

	.nav-li::after {
		content: "";
		position: absolute;
		z-index: -1;
		background-color: inherit;
		width: 100%;
		height: 100%;
		left: 0;
		bottom: -10%;
		border-radius: 10upx;
		opacity: 0.2;
		transform: scale(0.9, 0.9);
	}

	.nav-li.cur {
		color: #fff;
		background: rgb(94, 185, 94);
		box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
	}

	.nav-title {
		font-size: 32upx;
		font-weight: 300;
	}

	.nav-title::first-letter {
		font-size: 40upx;
		margin-right: 4upx;
	}

	.nav-name {
		font-size: 28upx;
		text-transform: Capitalize;
		margin-top: 20upx;
		position: relative;
	}

	.nav-name::before {
		content: "";
		position: absolute;
		display: block;
		width: 40upx;
		height: 6upx;
		background: #fff;
		bottom: 0;
		right: 0;
		opacity: 0.5;
	}

	.nav-name::after {
		content: "";
		position: absolute;
		display: block;
		width: 100upx;
		height: 1px;
		background: #fff;
		bottom: 0;
		right: 40upx;
		opacity: 0.3;
	}

	.nav-name::first-letter {
		font-weight: bold;
		font-size: 36upx;
		margin-right: 1px;
	}

	.nav-li text {
		position: absolute;
		right: 30upx;
		top: 30upx;
		font-size: 52upx;
		width: 60upx;
		height: 60upx;
		text-align: center;
		line-height: 60upx;
	}

	.text-light {
		font-weight: 300;
	}

	@keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}

	@-webkit-keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}


	/**
	 * 新增公共配置
	 * 
	 */
	.border {
		border: 1px solid black;

	}

	.record_head {
		height: 8vh;
		justify-content: center;
		display: flex;
		align-items: center;
		font-size: 1.2em;
		font-weight: 600;
	}

	.record_head>image {
		width: 3vh;
		height: 3vh;
	}

	.record_title {
		padding: 0 2vw 0 2vw;
	}

	.record_item {
		width: 94vw;
		margin-left: 3vw;
		height: 7vh;
		display: flex;
		position: relative;
		flex-direction: row;
		align-items: center;


	}

	.item_img,
	.item_sort {
		width: 3vh;
		height: 3vh;
	}

	.item_touxiang {
		margin-left: 2vw;
	}

	.item-right {
		display: flex;
		flex-direction: row;
		position: absolute;
		float: right;
		right: 0;
		align-items: center;
	}

	.item-name {
		margin-left: 1vw;
	}

	.item-price {
		color: red;
	}

	.item_sort {
		line-height: 3vh;
		text-align: center;
	}

	.record_foot {
		margin-top: 3vh;
		border-radius: 3vw;
		min-height: 10vh;



	}

	.foot {
		height: 5vh;
	}


	.loading1{
		width: 100vw;
		height: 100vh;
		position: absolute;
		z-index: 10;
		top: 0;
		background-color: #FFFFFF;
	}

	.shareBox {
		position: absolute;
		bottom: 0;
		width: 100vw;
		z-index: 9999;
	}

	.packBox {
		width: 100vw;
		position: fixed;
		z-index: 9999;
		top: 1;
	}

	.hongbao {
		position: fixed;
		z-index: 99;
		top: 15vh;
		float: right;
		right: 2vw;
	}
</style>
